 function bindValidation(formClassName){
 	$("."+formClassName).submit(function(){
	 	var validationStatus = true;
	 	$(".required").each(function(){
			if($(this).val() == "" || $(this).val().trim() == "" ){
				validationStatus = false;
				showError($(this), "requiredError");
			}else
			{
				hideError($(this), "requiredError");
			}
	 	});

	 	$(".numeric").each(function(){
		 	if($.isNumeric($(this).val()) == false){
		 		validationStatus = false;
				showError($(this), "correctData");
		 	}else {
		 		hideError($(this), "correctData");
		 	}

		 });

	 	$(".name").each(function(){
		 	if ( $(this).val().match('^[a-zA-Z]{3,50}$')) {
		 		hideError($(this), "correctData");
		    } else {
		 		validationStatus = false;
				showError($(this), "correctData");
		    }
	 	});

	 	$(".email").each(function(){
		 	if(IsEmail($(this).val()) == false) {
		 		validationStatus = false;
				showError($(this), "correctData");
		 	}else {
		 		hideError($(this), "correctData");
		 	}
		});
		
		if(validationStatus == true){
			return true;
		}else{
			return false;
		}
	});
 }

 function showError(element, className){
	 $(element).parent().find("."+className).slideDown();
 }
 function hideError(element, className){
	 $(element).parent().find("."+className).slideUp();
 }

 function IsEmail(email) {
        var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
        if(!regex.test(email)) {
           return false;
        }else{
           return true;
        }
  }